Skip to content

Conversation

@rotu
Copy link
Contributor

@rotu rotu commented Oct 17, 2019

I found that this test was failing on CycloneDDS because some unrelated node was publishing on the parameter_events topic, and these were getting caught up in the bag, and failing the test.

@rotu rotu changed the title Only listen for /string_topic messages Only listen on relevant message topic in message count test Oct 17, 2019
@rotu
Copy link
Contributor Author

rotu commented Oct 17, 2019

It seems I've fixed the same problem as #165. I recommend merging both :-)

@Karsten1987
Copy link
Collaborator

Isn't that defeating the purpose of the test though? The test name record_all_without_discovery_ignores_later_announced_topics indicates that all topics should be recorded, but with discovery being disabled, no topic should be recorded.

Why is there a different node still publishing though? The tests are written in a way that during execution no other nodes are active within the system.

@rotu
Copy link
Contributor Author

rotu commented Oct 17, 2019

I think you're right. The test should record all topics.

The '/parameter_events' topic for 'use_sim_time' is emitted by rclcpp itself. I'll take this back to the drawing board and figure out why.

I think we should be filtering the messages after receiving them. It would be nice if this test didn't require strict isolation in order to pass.

@mabelzhang mabelzhang added the enhancement New feature or request label Oct 17, 2019
@rotu rotu changed the title Only listen on relevant message topic in message count test Only fail on on relevant message topic in message count test Oct 17, 2019
@rotu
Copy link
Contributor Author

rotu commented Oct 17, 2019

Why is there a different node still publishing though? The tests are written in a way that during execution no other nodes are active within the system.

Fixed this in #180.

@rotu rotu force-pushed the patch1 branch 2 times, most recently from 252d9ae to 4b42d66 Compare October 19, 2019 01:25
@Karsten1987
Copy link
Collaborator

@rotu Can this be closed in favor of #180 then?

@rotu
Copy link
Contributor Author

rotu commented Oct 21, 2019

I don’t think it should be. They both seem like good refinements.

@Karsten1987
Copy link
Collaborator

fair enough. The current PR has some conflicts. Do you mind resolving them so that I can run CI on it?

Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch looks good to me. I'll have to wait until rebased and run CI on it.

Comment on lines 42 to 45
for (auto & msg : writer_->get_messages()) {
EXPECT_NE(msg->topic_name, topic);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's easier to replace this for loop with a call to writer_->get_topics().
Something like:

auto recorded_topics = writer_->get_topics();
EXPECT_EQ(0u, recorded_topics.count(topic));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Will do.

@rotu rotu force-pushed the patch1 branch 2 times, most recently from 6ffe653 to 1184034 Compare October 21, 2019 20:11
@Karsten1987
Copy link
Collaborator

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@Karsten1987
Copy link
Collaborator

Sorry @rotu, the intraprocess PR just landed in the meantime. Do you mind rebasing one more time please?

I found that this test was failing on CycloneDDS because some unrelated node was publishing on the `parameter_events` topic, and these were getting caught up in the bag, and failing the test.

Signed-off-by: Dan Rose <[email protected]>
@rotu
Copy link
Contributor Author

rotu commented Oct 21, 2019

@Karsten1987 You got it!

@Karsten1987
Copy link
Collaborator

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch.

@Karsten1987 Karsten1987 merged commit 1e3ba4b into ros2:master Oct 21, 2019
@rotu rotu deleted the patch1 branch October 22, 2019 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants